package com.igeek.boot.controller;

import com.igeek.boot.result.Result;
import com.igeek.boot.service.UVService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author fengqq
 * @Description TODO
 * @Date 2024/9/5  11:24
 */
@RestController
@RequestMapping("/uv")
@Api(tags = "UV统计的控制层")
@Slf4j
public class UVController {

    @Autowired
    private UVService uvService;

    @GetMapping("/count")
    @ApiOperation("统计UV量")
    public Result count(){
        Long count = uvService.count();
        return new Result(200,"统计成功",count);
    }
}
